import {ADD_CART,ADD_COUNTER} from "./mutation-types";

export default {
  //mutations唯一的目的就是修改state的状态
  //mutations中尽可能使每个方法完成的事件单一一点
  [ADD_COUNTER](state,payload){
    payload.count++
  },
  [ADD_CART](state,payload){
    payload.checked=true
    state.cartList.push(payload)
  }
}
